<?php require(DIR_TEMPLATE . C('config_template')."/setting/setting.php" ); ?>
<?php echo $header; ?>

<?php if ($SPAN[0]) { ?>
  <div class="span<?php echo $SPAN[0]; ?>">
    <?php echo $column_left; ?>
  </div>
<?php } ?>

<div class="span<?php echo $SPAN[1];?>">
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  
  <?php echo $content_top; ?>
  
  <h1><?php echo $_['heading_title']; ?></h1>
   <?php if ($success) { ?>
	<div class="success"><?php echo $success; ?></div>
  <?php } ?>
  <?php if (isset($error_warning)) { ?>
	<div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  
  <h2><?php echo $_['text_address_book']; ?></h2>
  <?php foreach ($addresses as $result) { ?>
  <div class="content">
    <table style="width: 100%;">
      <tr>
        <td><?php echo $result['address']; ?></td>
        <td style="text-align: right;"><a href="<?php echo $result['update']; ?>" class="button"><?php echo $_['button_edit']; ?></a> &nbsp; <a href="<?php echo $result['delete']; ?>" class="button"><?php echo $_['button_delete']; ?></a></td>
      </tr>
    </table>
  </div>
  <?php } ?>
  <div class="buttons">
    <div class="left"><a href="<?php echo US('account/account'); ?>" class="button"><?php echo $_['button_back']; ?></a></div>
    <div class="right"><a href="<?php echo US('account/address/insert'); ?>" class="button"><?php echo $_['button_new_address']; ?></a></div>
  </div>
  <?php echo $content_bottom; ?></div>
</div>

<?php if ($SPAN[2]) { ?>
  <div class="span<?php echo $SPAN[2]; ?>">
    <?php echo $column_right; ?>
  </div>
<?php } ?>

<?php echo $footer; ?>